package com.doria.common.exception;

import com.doria.common.ad_enum.ExceptionEnum;

/**
 * 业务异常
 */
public class BusinessException extends RuntimeException {

    private final Integer errCode;
    private final String errMsg;

    public Integer getErrCode() {
        return errCode;
    }

    public String getErrMsg() {
        return errMsg;
    }

    public BusinessException(ExceptionEnum exceptionEnum) {
        this.errCode = exceptionEnum.getCode();
        this.errMsg = exceptionEnum.getInfo();
    }
}
